/**
 * author:Administrator
 * date:2016/1/4
 * desc:TODO
 */

'use strict';

var connedSeq = require('../conn/sequelize.js');
var Sequelize = require('sequelize');
var DataTypes = Sequelize;

var Vendor = connedSeq.define('vendor',
  {
    id: {type: DataTypes.INTEGER(11), allowNull: false, primaryKey: true, autoIncrement: true},
    uId: {type: DataTypes.INTEGER(11), allowNull: true},
    name: {type: DataTypes.STRING, allowNull: false},
    type: {type: DataTypes.STRING, allowNull: false},
    status: {type: DataTypes.STRING, allowNull: false},

    tel: {type: DataTypes.STRING, allowNull: true},
    desc: {type: DataTypes.STRING, allowNull: true},
    imgUrls: {type: DataTypes.STRING, allowNull: true},
    cardNo: {type: DataTypes.STRING, allowNull: true},
    bankName: {type: DataTypes.STRING, allowNull: true},
    createdAt: {type: DataTypes.INTEGER(11), allowNull: false},
    updatedAt: {type: DataTypes.INTEGER(11), allowNull: true},
  },

  {
    tableName: 'vendor',
    freezeTableName: true,
    createdAt: false,
    updatedAt: false
  });

module.exports = Vendor;
